home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2510.ZIP / TRSOURCE.EXE / NTOD.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  600b  |  31 lines

  1. /*********
  2. * Function: NTOD
  3. *
  4. * By: Tom Rettig
  5. *
  6. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  7. *
  8. * Syntax: NTOD( <year>, <month>, <day> )
  9. * Return: Valid <expD> of <year> plus <month> plus <day>
  10. *         Empty <expD> if syntax error
  11. ********/
  12.  
  13. #include "trlib.h"
  14.  
  15. TRTYPE ntod()
  16. {
  17.    double year, month;
  18.    long int day;
  19.  
  20.    if ( PCOUNT==3 && ISNUM(1) && ISNUM(2) && ISNUM(3) )
  21.    {
  22.       year  = _parnd(1);
  23.       month = _parnd(2);
  24.       day   = _parnl(3);
  25.       _retds(  _tr_makedate(year, month, day) );
  26.    }
  27.    else
  28.       _retds( BLANKDS );
  29. }
  30.  
  31.